import VueRouter from "vue-router"
import Vue from "vue"

Vue.use(VueRouter)

import cart from "views/cart/Cart.vue"
import category from "views/category/Category.vue"
import home from "views/home/Home.vue"
import profile from "views/profile/Profile.vue"
import Detail from 'views/detail/Detail'



const routes = [{
        path: "/",
        redirect: "/home"
    },
    {
        path: "/home",
        component: home
    },
    {
        path: "/cart",
        component: cart
    },
    {
        path: "/category",
        component: category
    },
    {
        path: "/profile",
        component: profile
    },
    {
        path: "/detail/:iid",
        component: Detail
    },
]

const router = new VueRouter({
    routes,
    mode: "history"
})

export default router